<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<header class="navbar-default">
	<nav class="navbar navbar-default navbar-inverse" role="navigation">
		<div class="container">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">展开</span> <span class="icon-bar"></span> <span
						class="icon-bar"></span> <span class="icon-bar"></span>
				</button>
				<!-- logo 图片随便放的 -->
				<div class="pull-left" id="header-logo">
					<a href="home"><img width="42px" height="42px"
						src="${path}/favicon.ico"></a>
				</div>
				<a class="navbar-brand hidden-xs" href="${path}/">&nbsp;教学资源管理系统&nbsp;</a>
				<!-- 移动端可见 -->
				<!-- <div class="pull-right visible-xs" style="margin-right: 10px">
					<a href="#" data-no-instant="">
						<button id="loginout" type="button"
							class="btn btn-primary navbar-btn">登陆</button>
					</a>
				</div> -->
				<form action="search" class="visible-xs form-horizontal" id="nav_search" method="post"
					role="form"
					style="padding: 8px;overflow: hidden;padding-left: 16px;">
					<div class="input-group">
						<input name="keyword" type="text" class="form-control" placeholder="搜索" required>
						<span class="input-group-btn">
							<button type="submit" id="nav_search_xs_submit"
								class="btn btn-default">搜索</button>
						</span>
					</div>
				</form>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li><a href="${path}/">首页</a></li>
					<li><a href="task">作业</a></li>
					<li><a href="courseware">课件</a></li>
					<li><a href="message?pageNum=1">通知</a></li>
					<li><a href="about">关于</a></li>
				</ul>
				<form action="search" class="navbar-form navbar-left hidden-xs"  method="post"
					id="nav_search" role="search">
					<div class="input-group" style="overflow: hidden;width: 350px;">
						<input name="keyword" type="text" class="form-control" placeholder="搜索" required>
						<span class="input-group-btn">
							<button type="submit" class="btn btn-default">搜索</button>
						</span>
					</div>
					<div class="input-append"></div>
				</form>
				<ul class="nav navbar-nav navbar-right" style="margin-right: 10px">
					<%
						if (request.getSession().getAttribute("username") == null) {
					%>
					<li><a href="login">登陆</a></li>
					<%
						} else {
					%>
					<li><a href="account">欢迎你:${username}</a></li>
					<li><a href="logout">注销</a></li>
					<%
						}
					%>
				</ul>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- /.container -->
	</nav>
</header>